package com.techie.mdm.appbar.showcase.command;

import org.springframework.richclient.application.Application;
import org.springframework.richclient.application.ApplicationPage;
import org.springframework.richclient.application.ApplicationWindow;
import org.springframework.richclient.application.PageComponent;
import org.springframework.richclient.command.ActionCommand;

import javax.swing.*;
import java.awt.*;

public class ToggleFullScreenCommand extends ActionCommand
{
    public ToggleFullScreenCommand()
    {
        super("toggleFullScreenCommand");
    }


    @Override
    protected void doExecuteCommand()
    {
        Application app = Application.instance();
        ApplicationWindow w = app.getActiveWindow();
        ApplicationPage page = w.getPage();

        PageComponent activeComponent = page.getActiveComponent();
        Component control = activeComponent.getControl();
        JOptionPane.showConfirmDialog(control, "HELLP WORLD");
    }
}
